package com.example.service;

import com.example.entity.Department;
import com.example.entity.DepartmentOrderStatistics;
import com.example.entity.OrderDailyStatistics;
import com.example.entity.WorkOrder;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface WorkOrderService {

    /**
     * 分页查询
     */
    PageInfo<WorkOrder> selectPage(WorkOrder workOrder, Integer pageNum, Integer pageSize);

    /**
     * 新增
     */
    void add(WorkOrder workOrder);

    /**
     * 删除
     */
    void deleteById(Integer id);

    /**
     * 批量删除
     */
    void deleteBatch(List<Integer> ids);

    /**
     * 修改
     */
    void updateById(WorkOrder workOrder);

    /**
     * 分派
     */
    void fenpai(Department department);

    /**
     * 查询7月每天的工单总量、超期率
     */
    List<OrderDailyStatistics> getDailyOrderStatisticsForMonth(int year, int month);

    /**
     * 查询7月每个部门的工单总量、超期率
     */
    List<DepartmentOrderStatistics> getDepartmentOrderStatisticsForMonth(int year, int month);
}
